Skip to content

feat(hook): Deliver events to integrations - #607

Draft
prathshenoy wants to merge 1 commit into
mainfrom
prath.shenoy/hook-dispatch
Draft

feat(hook): Deliver events to integrations#607
prathshenoy wants to merge 1 commit into
mainfrom
prath.shenoy/hook-dispatch

Conversation

@prathshenoy

@prathshenoy prathshenoy commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

What:

  • Consume lifecycle events from a durable queue and hand each one to every integration wired for the deployment, retrying and then dead-lettering the ones that keep failing.
  • Record every dead-lettered event with its full payload and failure reason, and count it on a metric meant to page.

Why:

  • Keep a slow or broken integration from stalling or failing the work that triggered it.
  • Make a lost notification recoverable and impossible to miss, since nothing else in the system notices when one goes missing.

Test Plan

  • Add unit tests.

Revert Plan

  • Revert this PR. No service constructs the dispatcher or subscribes to the hook topic.

Issues

@prathshenoy
prathshenoy force-pushed the prath.shenoy/hook-event-contract branch from b5394eb to 837e0d8 Compare August 17, 2026 16:54
@prathshenoy
prathshenoy force-pushed the prath.shenoy/hook-dispatch branch from a09dcab to b6aef89 Compare August 17, 2026 16:56
@prathshenoy
prathshenoy marked this pull request as ready for review August 17, 2026 16:56
@prathshenoy
prathshenoy force-pushed the prath.shenoy/hook-event-contract branch from 837e0d8 to b5394eb Compare August 18, 2026 00:27
@prathshenoy
prathshenoy force-pushed the prath.shenoy/hook-dispatch branch from b6aef89 to a09dcab Compare August 18, 2026 00:27
@behinddwalls

Copy link
Copy Markdown
Collaborator

🛑 Automatic stack rebase aborted — diff mismatch

The rebase of prath.shenoy/hook-dispatch completed without conflicts, but the resulting code diff does not match the original. This means the rebase silently altered code content. The branch was not force-pushed.

Please rebase manually and verify the changes are correct.

Comment thread platform/extension/hook/composite/hook.go Outdated
Comment thread platform/extension/hook/composite/hook.go Outdated
behinddwalls pushed a commit to behinddwalls/submitqueue that referenced this pull request Aug 19, 2026
## Summary
**What**:
- Define the shared event format every domain publishes for
fire-and-forget lifecycle notifications, carrying origin, type, timing,
a staleness marker, and open per-event detail.
- Derive an event's identity from the transition it describes, so
replaying a transition produces the same identity and duplicate
deliveries collapse.

**Why**:
- Enable integrations to react to pipeline milestones without adding
call sites that can stall or fail a merge.
- Establish one schema and one identity rule before any producer ships,
so a consumer spanning several domains needs only one reader.

## Test Plan
- [x] Add unit tests.

## Revert Plan
- Revert this PR. No topic is registered and no message of this shape
exists on any queue.

## Issues
-
[CODEM-416](https://linear.app/uber/issue/CODEM-416/hooks-integration-downstream-notificaiton)

## Stack
1. @ uber#606
1. uber#607
1. uber#608
Comment thread platform/extension/hook/hook.go Outdated
)

// Hook performs a side effect in response to a lifecycle event.
type Hook interface {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my general question here is why is it an extension vs a plain consumer who gets hooks events from wire and implements consumer controller? why it needs to be an interface?

Comment thread platform/extension/hook/composite/hook.go Outdated
Comment thread platform/hook/dlq.go
// on. Dropping an observability row costs a gap in a read model; dropping a
// merge-failure comment costs a support ticket, and nothing else in the system
// will notice it is missing.
type DLQController struct {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to provide DLQ Hook extension as well? so we do think in most cases, there is nothing to really reconcile, but say for example, I want to close PR when merge is done and for whatever reason that fails..should we have ability to handle those from retries and DLQ? just a thought, we don't need to support as such

@prathshenoy
prathshenoy force-pushed the prath.shenoy/hook-dispatch branch from a09dcab to 56a21ac Compare August 20, 2026 20:54
An error occurred while trying to automatically change base from prath.shenoy/hook-event-contract to main August 20, 2026 20:58
An error occurred while trying to automatically change base from prath.shenoy/hook-event-contract to main August 20, 2026 20:58
An error occurred while trying to automatically change base from prath.shenoy/hook-event-contract to main August 20, 2026 20:58
An error occurred while trying to automatically change base from prath.shenoy/hook-event-contract to main August 20, 2026 20:58
@prathshenoy
prathshenoy force-pushed the prath.shenoy/hook-dispatch branch from 56a21ac to 63b4e01 Compare August 20, 2026 20:59
@prathshenoy
prathshenoy deleted the branch main August 20, 2026 21:07
@prathshenoy prathshenoy reopened this Aug 20, 2026
@prathshenoy
prathshenoy changed the base branch from prath.shenoy/hook-event-contract to main August 20, 2026 21:36
@prathshenoy
prathshenoy marked this pull request as draft August 20, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants